﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="account.aspx.cs" Inherits="WebSite.cn.account" %>
<%@ Register Src="head.ascx" TagName="head" TagPrefix="uc1" %>

<%@ Register Src="bottom.ascx" TagName="bottom" TagPrefix="uc3" %>
<%@ Register src="../Controls/AddressArea.ascx" tagname="AddressArea" tagprefix="uc6" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title><%=WebSite.info.info1("", "shoptitle")%></title>
    <meta name="Description" content="<%=WebSite.info.info1("","shopcontent")%>" /> 
    <meta name="Keywords" content="<%=WebSite.info.info1("","shopkey")%>" />
    <script language="JavaScript" src="../../js/function.js"></script>
     <script language="JavaScript" src="../popcalendar.js"></script>
    <script language="javascript" type="text/javascript" src="/My97DatePicker/WdatePicker.js" charset="utf-8"></script>
    <script language="javascript" type="text/javascript">


     function checkDateTime(from ,to) { 
if(from==""||to=="")return 2; 
var rValue = 0 ; 
for(var i=0 ;i<16 ;i++) { 
   if(from.charAt(i) < to.charAt(i)) { 
    rValue = 1 ; break ; } 
   else if(from.charAt(i) > to.charAt(i)) { rValue = -1 ; break ; } } return rValue ; 
} 



    function CheckFrm(){

        var div=document.getElementById("shipid");
        var tCname = document.getElementById("cname");
        var tAddress = document.getElementById("address");
          var tCname1 = document.getElementById("cname1");
        var tPost1 = document.getElementById("post1");
           var tPost = document.getElementById("post");
        var tAddress1 = document.getElementById("address1");
         var tTel = document.getElementById("tel");
         var tTel1 = document.getElementById("tel1");
        var tPhone = document.getElementById("phone");
        var tPhone1 = document.getElementById("phone1");
         var tEmail = document.getElementById("email");
         var tEmail1 = document.getElementById("email1");
         var provence = document.getElementById("AddressArea1_ddlProvence");
         var city = document.getElementById("AddressArea1_ddlCity");

          var tremark = document.getElementById("remark");
        var tremark1 = document.getElementById("remark1");
           var obj = document.getElementById('senddate');

        if(obj.value == "")
        {
           alert("送货日期不能为空");
            obj.focus();
            return false;
        }

        if (tCname.value == "") {
            alert("姓名不能为空");
            tCname.focus();
            return false;
        } else if ((tTel.value == "") && (tPhone.value == "")) {
            alert("电话和手机致少填一项!");
            return false;
        }
        else if (provence.value == "") {
            alert("请选择省");
            provence.focus();
            return false;
        }
        else if (city.value == "") {
            alert("请选择城市");
            city.focus();
            return false;
        }
        else if (tAddress.value == "") {
            alert("地址不能为空");
            tAddress.focus();
            return false;
        }
	  
	    if(div.style.display=="")
	    {
	      if(tCname1.value == "")
            {
            alert("姓名不能为空");
            tCname1.focus();
            return false;
            }else   if ((tTel1.vl="")&&(tpPhone1.value=="")){
	         alert("电话和手机致少填一项!");
	         return false;
	         }
             else if(tAddress1.value == "")
            {
            alert("地址不能为空");
            tAddress1.focus();
            return false;
            }
	    }

        var dtArr = obj.value.split("-");
           var toDay = new Date();

        var dt1 = dtArr[0] + "-" + dtArr[1] + "-" + dtArr[2];
        var dt2 = toDay.getUTCFullYear() + "-" + (parseInt(toDay.getMonth()) + 1) + "-" + (parseInt(toDay.getDate()) + 3);
       

         var dtTmp1 = new Date(dt1.replace(/-/g,"/"));
         var dtTmp2 = new Date(dt2.replace(/-/g, "/"));

        if(dtTmp1 < dtTmp2)
       {
             alert('送货日期必须在三天之后（包括三天）！');    
             obj.value="";
             obj.focus();
             return false;
         }


       if( '<%=priceMessage %>' != '') {

           if ('<%=priceMessage %>' == '您需多付10元送货费，确认要购买吗？') {
               return confirm('您需多付10元送货费，确认要购买吗？');
           }
           else {
               alert('<%=priceMessage %>');
               return false;
           }
        }else
        {
          return confirm("您确认要购买吗？");
        }
    }
    function checkcopy()
    {
        var div=document.getElementById("shipid");
        var tCname = document.getElementById("cname");
        var tAddress = document.getElementById("address");
          var tCname1 = document.getElementById("cname1");
        var tPost1 = document.getElementById("post1");
         var tPost = document.getElementById("post");
        var tAddress1 = document.getElementById("address1");
         var tTel = document.getElementById("tel");
         var tTel1 = document.getElementById("tel1");
        var tPhone = document.getElementById("phone");
        var tPhone1 = document.getElementById("phone1");
         var tEmail = document.getElementById("email");
        var tEmail1 = document.getElementById("email1");

          var tremark = document.getElementById("remark");
        var tremark1 = document.getElementById("remark1");
      tCname1.value=tCname.value;
      tTel1.value=tTel.value;
      tPhone1.value=tPhone.value;
      tPost1.value=tPost.value;
      tAddress1.value = document.getElementById("AddressArea1_ddlProvence").value + document.getElementById("AddressArea1_ddlCity").value + tAddress.value;
      tEmail1.value=tEmail.value;
      tremark1.value = tremark.value;
      //frm.remark1.value=frm.remark.value;
    }
    function chk1Clicked()
    {
    var chk=document.getElementById("chk1");
    var div=document.getElementById("shipid");
    if(chk.checked){div.style.display="none";}
    else div.style.display="";
    }


    
    
    </script>
</head>
<body>
	<uc1:head ID="head_1" runat="server" />
        <center>
<div id="container">
      <div id="divTopMessage" runat="server" align="left" style="line-height:40px">
<%--      <form id="formTop" runat="server">
        <asp:Label ID="lblMoneyMessage" ForeColor="Red" runat="server"></asp:Label> 
        </form>--%>
      </div>

      <div  runat="server" id="divProfession" visible="true">

        <div  class="title">
			<p>专区商品</p>
	  </div>   
      <div class="pro02" >
          <table width="100%" style="border-top: 1px solid #ff980d;" 
                cellspacing="0" class="article_content">
	      <tr bgcolor="#fff5e8">
	        <td width="90" height="28" align="center"><strong>商品图</strong></td>
	        <td align="left"><strong>商品名</strong></td>
	        <td width="90" align="center"><strong>单价</strong></td>
	        <td width="90" align="center"><strong>数量</strong></td>
	        <td width="90" align="center"><strong>共计</strong></td>
	        <td width="90" align="center"><strong>操作</strong></td>
	     </tr>
	        <%=carInfoProfession%>
	      <tr>
	        <td height="1" colspan="6" align="center" background="images/pro/line_vbg1.gif"><img src="images/pro/space.gif" width="1" height="1" /></td>
	        </tr>
	      </table>
               <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td bgcolor="#fff5e8">&nbsp;<a href="ProfessionArea.aspx?sid=2" ><img src="images/az-addressbook-continue-shopping.gif" alt="继续购物" width="135" height="22" border="0" /></a></td>
            <td height="30" bgcolor="#fff5e8">总计：<span class="text_red"><%= professionPrice.ToString()%></span><span class="a_title_green"> 元 </span></td>
          </tr>
		  <tr>
            <td width="77%" height="1" bgcolor="#ff980d"></td>
            <td width="23%" bgcolor="#ff980d"></td>
          </tr>
        </table>
      </div>
      </div>

        <div  runat="server" id="divShopping" visible="false">

	  <div class="title">
			<p>商城商品</p>
	  </div>   
	  <div class="pro02"><br />
	    <br />
	     <table width="100%" style="border-top: 1px solid #ff980d;" 
                cellspacing="0" class="article_content">
	      <tr bgcolor="#fff5e8">
	        <td width="90" height="28" align="center"><strong>商品图</strong></td>
	        <td align="left"><strong>商品名</strong></td>
	        <td width="90" align="center"><strong>单价</strong></td>
	        <td width="90" align="center"><strong>数量</strong></td>
	        <td width="90" align="center"><strong>共计</strong></td>
	        <td width="90" align="center"><%= SOperateNoPayOrder %></td>
	     </tr>
	        <%=carInfoShop%>
	      <tr>
	        <td height="1" colspan="6" align="center" background="images/pro/line_vbg1.gif"><img src="images/pro/space.gif" width="1" height="1" /></td>
	        </tr>
	      </table>
           
	     <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td bgcolor="#fff5e8">&nbsp;<a style="<%= DisplayOrderForm%>" href="hotpro.aspx?sid=4" ><img src="images/az-addressbook-continue-shopping.gif" alt="继续购物" width="135" height="22" border="0" /></a></td>
            <td height="30" bgcolor="#fff5e8">总计：<span class="text_red"><%= shopprice.ToString()%></span><span class="a_title_green"> 元 </span></td>
          </tr>
		  <tr>
            <td width="77%" height="1" bgcolor="#ff980d"></td>
            <td width="23%" bgcolor="#ff980d"></td>
          </tr>
        </table>
        </div>

        </div>

	  <div class="pro02"><br />

       <form id="frm" action="PayMoney.aspx" method="post">
		
		 <div style="<%=DisplayOrderForm %>">
	       <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CECECE">
		     <tr>
		       <td height="25" bgcolor="#EEEEEE" class="white_bold">　<strong>下单人信息</strong></td>
		       <td align="left" bgcolor="#EEEEEE" class="white_bold"><input type="checkbox" name="chk1" id="chk1" onclick="chk1Clicked()" value="1" checked="checked" />
	             <label for="chk1"><strong>收件人信息与下单人信息相同</strong></label></td>
	        </tr>
		     <tr>
		       <td width="130" height="25" align="right" bgcolor="#FFFBF4">姓 名：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	           <input name="cname" id="cname" value="<%=cname %>" class="box" size="20" maxlength="100" type="text" />*<input name="carid" type="hidden" value="<%=carid %>" /></td>
	        </tr>
		     <tr>
		       <td height="25" align="right" bgcolor="#FFFBF4">联系电话：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	           <input name="tel" id="tel" value="<%=tel %>" class="box" size="20" maxlength="20" type="text" />
                   电话和手机致少填一项</td>
	        </tr>
		     <tr>
		       <td height="25" align="right" bgcolor="#FFFBF4">手 机：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	           <input name="phone" id="phone" value="<%=phone %>" class="box" size="20" maxlength="20" type="text" /></td>
	        </tr>
		     <tr style="display:none">
		       <td height="25" align="right" bgcolor="#FFFBF4">邮 编：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	           <input name="post" id="post" value="<%=post %>" class="box" size="20" maxlength="20" type="text" />*</td>
	        </tr>
		     <tr>
		       <td height="25" align="right" bgcolor="#FFFBF4">地 址：</td>
		       <td align="left" bgcolor="#FFFFFF">　
               

	           <uc6:AddressArea ID="AddressArea1" runat="server" />


	           <input name="address" id="address" value="<%=address %>" class="box" size="50" maxlength="255" type="text" />*</td>
	        </tr>
		     <tr  style="display:none">
		       <td height="25" align="right" bgcolor="#FFFBF4">E-MAIL：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	           <input name="email" id="email" value="<%=email %>" class="box" size="50" maxlength="255" type="text" /></td>
	        </tr>
		     <tr>
		       <td height="25" align="right" bgcolor="#FFFBF4">送货日期：</td>
		        <td align="left" bgcolor="#FFFFFF">　
                <input id="senddate"  name="senddate" type="text" onfocus="new WdatePicker(this,'%Y-%M-%D',true,'default')"
                        onpaste="return false" style="ime-mode: disabled" value="<%=sendDate %>" />
            
	           </td>
	        </tr>
		     <tr>
		       <td height="25" align="right" bgcolor="#FFFBF4">备 注：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	             <input id="remark" name="remark" class="box" type="text" style="width:560px" maxlength="300"/>
               </td>
	        </tr>
		     <tr>
		       <td height="25" align="right" bgcolor="#FFFBF4">&nbsp;</td>
		       <td align="left" bgcolor="#FFFFFF">
               我们会尽量根据您的要求进行配送，但如遇繁忙时段，将不能完全满足您的时间要求，届时敬请谅解</td>
	        </tr>
	      </table>
		<br />
	      <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CECECE" id="shipid" style="display:none;">
		     <tr>
		       <td height="25" bgcolor="#EEEEEE" class="white_bold">　<strong>收件人信息</strong></td>
		       <td align="left" bgcolor="#EEEEEE" class="white_bold"> <a href="javascript:checkcopy();">[复制下单人信息]</a></td>
	        </tr>
		     <tr>
		       <td width="130" height="25" align="right" bgcolor="#FFFBF4">姓 名：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	           <input name="cname1" id="cname1"  class="box" size="20" maxlength="100" type="text" />*</td>
	        </tr>
		     <tr>
		       <td height="25" align="right" bgcolor="#FFFBF4">联系电话：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	           <input name="tel1" id="tel1" class="box" size="20" maxlength="20" type="text" />
                   电话和手机致少填一项</td>
	        </tr>
		     <tr>
		       <td height="25" align="right" bgcolor="#FFFBF4">手 机：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	           <input name="phone1" id="phone1" class="box" size="20" maxlength="20" type="text" /></td>
	        </tr>
		     <tr style="display:none">
		       <td height="25" align="right" bgcolor="#FFFBF4">邮 编：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	           <input name="post1" id="post1" class="box" size="20" maxlength="20" type="text" />*</td>
	        </tr>
		     <tr>
		       <td height="25" align="right" bgcolor="#FFFBF4">地 址：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	           <input name="address1" id="address1" class="box" size="50" maxlength="255" type="text" />*</td>
	        </tr>
		     <tr  style="display:none">
		       <td height="25" align="right" bgcolor="#FFFBF4">E-MAIL：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	           <input name="email1" id="email1" class="box" size="50" maxlength="255" type="text" /></td>
	        </tr>
            <tr>
		       <td height="25" align="right" bgcolor="#FFFBF4">备 注：</td>
		       <td align="left" bgcolor="#FFFFFF">　
	          
              	  <input id="remark1" name="remark1" class="box" type="text" style="width:560px" maxlength="300"/>
              </td>
	        </tr>
	      </table>
		     
             
             <br />
	
        <div style="width:95%; text-align:left; display:none;" >
        订单号：<asp:Label ID="lblordercode"  runat="server" ForeColor="Red"><%=tempOrderCode%></asp:Label>
        <input name="ordercode" type="hidden" value="<%=tempOrderCode%>" /> 
        </div>
         <table width="100%" border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td height="30" align="center">
            <input type="hidden" name="totalprice" value="<%=totalprice %>" />
            <input type="hidden" name="shopprice" value="<%=shopprice %>" />
            <input type="hidden" name="action" value="add" />
            <input type="submit" name="Submit" value="确认提交" style="background-image:url('images/ordersubmit.jpg'); border:0; cursor:pointer; width:95px; color:#fff; font-size:14px; font-weight:bold; height:31px;"onclick="return CheckFrm();" /></td>
          </tr>
        </table>

    
    	</div>

          <div style="<%=DisplayPlay %>">
                   <input type="submit" name="Submit"  style="background-image:url('images/alipay_1.gif'); border:0; cursor:pointer; width:92px; height:20px;" value=""   />
          </div>

          </form>
	  </div>
    
		</div>

              <br />
</center>

     <uc3:bottom ID="bottom_1" runat="server" />
</body>
</html>
